using UnityEngine;

public class EnemyState_LangGongShou_站立 : EnemyStateBase_LangGongShou
{
	public override void OnEnter()
	{
		_Mono._Ani.Play("站立");
		_Mono._Rb2D.velocity = new Vector2(_Mono.transform.position.x - _Mono._BeAttack_Pos.x, 0f).normalized * _Mono._BeAttack_击退力度;
		_Mono.transform.localScale = new Vector3((_Mono._BeAttack_Pos.x > _Mono.transform.position.x) ? 1 : (-1), 1f, 1f);
		_Timer = 0.3f;
	}

	public override void OnExit()
	{
	}

	public override void OnUpdate()
	{
		_Timer -= Time.deltaTime;
		if (_Mono._Is追击中)
		{
			_Mono.ChangeState(StateType_Enemy_LangGongShou.追击);
		}
		if (_Timer <= 0f)
		{
			_Mono.ChangeState(StateType_Enemy_LangGongShou.站立);
		}
	}
}
